<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="../../css/iuapmobile.um.css">
		<link rel="stylesheet" href="../../css/font-icons.css">
		<link rel="stylesheet" href="../../css/iscroll.css" />
		<script src="../../js/summer.js"></script>
		<script src="../../js/jquery.min.js"></script>
		<script src="../../js/Frameworks/iuapmobile.frameworks.ui.js"></script>
		<script src="../../js/iscroll.js"></script>
		<script src="../../js/angular.min.js"></script>
		<script src="../../js/mobiscroll_002.js" type="text/javascript"></script>
		<script src="../../js/mobiscroll_004.js" type="text/javascript"></script>
		<link href="../../css/mobiscroll.css" rel="stylesheet" type="text/css">
		<script src="../../js/mobiscroll.js" type="text/javascript"></script>
		<script src="../../js/mobiscroll_003.js" type="text/javascript"></script>
		<script src="../../js/mobiscroll_005.js" type="text/javascript"></script>
		<link href="../../css/mobiscroll_003.css" rel="stylesheet" type="text/css">
	</head>
	<body class="f14" ng-app="myApp" ng-controller="myCtrl" ng-init="shfwzt=true" style="height=100%; width=100%">
		<div class="um-win" id="index">
			<div class="um-header" >
				<a href="#" class="um-back back"> 返回 </a>
				<h3>签名</h3>
				<a href="#" class="um-header-right">
				<p>
					<span class="menu">确定</span>
				</p> </a>
			</div>

			<div class="um-content" style="height=100%; width=100%">
        			<canvas id="canvas">
        			</canvas>
			</div>
		</div>
	</body>
	 <script>
           
            window.onload = function(){
                var canvas = document.getElementById("canvas");
                canvas.height = document.body.clientHeight -50;
                canvas.width = document.body.clientWidth ;
                var ctx = canvas.getContext("2d");
                ctx.lineWidth = 6.0;
                canvas.addEventListener('touchstart',function(event){//触摸点按下事件
                    if (event.targetTouches.length == 1) {
                        var touch = event.targetTouches[0];
                        ctx.beginPath();
                        ctx.moveTo(touch.clientX-canvas.offsetLeft,touch.clientY-canvas.offsetTop);
                        canvas.addEventListener('touchmove',function (event) {//手机拖动触摸点事件
                            var touche = event.targetTouches[0];
                            ctx.lineTo(touche.clientX - canvas.offsetLeft, touche.clientY - canvas.offsetTop);
                            ctx.stroke();
                        },false)
                        canvas.addEventListener('touchend',function (event) {//手机离开屏幕的事件
                            ctx.closePath();

                        },false)

                    }
                },false)

            }
          
        </script>
</html>